﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WPFOpenVideo.Att
{
    [AttributeUsage(AttributeTargets.Method,AllowMultiple =false,Inherited =true)]
    public class IsConfirmModify:Attribute
    {
        private string _contentStr;

        public IsConfirmModify(string ContentStr)
        {
            _contentStr = ContentStr;
        }

        public bool ConfirmModifyAtt()
        {
            DialogResult result = MessageBox.Show(_contentStr, "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation);
            if (result==DialogResult.Cancel)
            {
                return false;
            }
            else
            {
                return true;
            }
        }
    }
}
